//
//  EMUserNotificationHelper.swift
//  swiftim
//
//  Created by yangjian on 2023/5/30.
//

import Foundation
import UserNotifications
import HyphenateChat

class EMUserNotificationHelper :NSObject, UNUserNotificationCenterDelegate,EMLocalNotificationDelegate{
    
    //singleton
    static let share = EMUserNotificationHelper()
    private override init(){}

    
    func emGetNotificationMessage(_ notification: UNNotification, state: EMNotificationState) {
        
    }
    
    func emDidRecivePushSilentMessage(_ messageDic: [AnyHashable : Any]) {
        
    }
    
//    - (void)emuserNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions options))completionHandler;

    func emuserNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification) async -> UNNotificationPresentationOptions {
        
//        UNNotificationPresentationOptionBadge
//                          |UNNotificationPresentationOptionSound
//                          |UNNotificationPresentationOptionAlert
        
        return [.badge,.sound,.alert]
    }
    
    
    
    
    
    
}
